package a02;

import java.util.ArrayList;
import java.util.List;

public class GoScore {

    private GoControl control;

    public GoScore(GoControl goControl) {
	this.setGo(goControl);
    }
    
    public List<String> getScoreTable() {
	List<String> scoreTable = new ArrayList<String>();	
	scoreTable.add("TESTSCORE");	
	return scoreTable;
    }

    public GoControl getGo() {
	return control;
    }

    public void setGo(GoControl goControl) {
	this.control = goControl;
    }
    
    
    public int getStonesCount(byte player) {
	int count = 0;
	for (int x = 0; x < control.getSession().getColumns()-1; x++) {
	    for (int y = 0; y < control.getSession().getRows()-1; y++) {		
		if(control.getSession().getB()[x][y]==player) count++;		
	    }
	}	
	return count;	
    }

}
